<template>
  <div class="slideDialog_wrap">
     <div class="slideDialog_content">
        <h2 class="slideDialog_contentTitle"><i @click="close" class="slideDialog_close iconfont icon-yuanjiaojuxingkaobei"></i> 每日任务—收集片区使用量 <span>已完成</span> </h2>
        <div class="slideDialog_main">
  <div class="">
  <el-row :gutter="10">
    <el-col :span="18"><div class="grid-content bg-purple">
      <div class="slideDialog_item">
        <div class="slideDialog_s_group clear">
          <div class="slideDialog_s_item">任务发起时间<span class="date">{{userInfoDto.startTime}}</span></div>
          <div class="slideDialog_s_item">任务发起时间<span class="date">{{userInfoDto.endTime}}</span></div>
        </div>
        <div class="slideDialog_inlineLi">
          <ul>
            <li><label>发起人:</label><b>{{userInfoDto.username}}</b></li>
            <li><label>部门:</label><b>{{userInfoDto.deptName}}</b></li>
            <li><label>职位:</label><b>营运产品</b></li>
          </ul>
        </div>
      </div>
      <table-control v-if="cusForms" :cusForms.sync="cusForms"></table-control>

    </div>
   </el-col>

    <el-col :span="6"><div class="grid-content bg-purple-light">
      <div class="slideDialog_item">
        任务发起时间
      </div>

      <div class="slideDialog_tabItem" @click="tabSwitch(timeShaft.nodeId,timeShaft.taskId,timeShaft.procInstanceId)" v-for="timeShaft in timeAxisDtos">
        <h5>{{timeShaft.createTime}}</h5>
        <div class="slideDialog_item">
           <img width="34" height="34" v-if="timeShaft.images" :src="timeShaft.images"  alt="" class="spic">
           <img width="34" height="34" v-else src="../../common/images/user.png"  alt="" class="spic">
           <label class="name">{{timeShaft.username}}</label><span class="fun">{{timeShaft.taskHandleNode}}</span>
           <div class="">
             {{timeShaft.taskExplain}}
           </div>
        </div>
      </div>
    </div></el-col>
    </el-row>
  </div>
</div>
</div>
</div>
</template>

<script>
import tableControl from './task_tableControl'
export default {
  props:["propsData","headBind","propTimeAxisDtos","propUserInfoDto","propCusForms"],
  data(){
    return{
      timeAxisDtos:'',
      userInfoDto:'',
      cusForms:''
    }
  },
  methods:{
    setCusForms(val){
      this.cusForms = val;
    },
    tabSwitch(nodeId,taskId,procInstanceId){
      this.headBind(nodeId,taskId,procInstanceId)
      // let params = {
      //   "data": {
      //     "nodeId":nodeId,
      //     "taskId":taskId,
      //     "procInstanceId":procInstanceId
      //   }
      // }
      // this.$post("/custom/detail",params,data => {
      //     this.cusForms = data.data.cusForms;
      //   },error => {
      //     alert("请求出错");
      // });
    },
    close(){
        this.$emit('update:taskDialogVisible', false)
    }
  },
  components:{
    tableControl
  },
  created(){
    this.timeAxisDtos = this.propTimeAxisDtos;
    this.userInfoDto = this.propUserInfoDto;
    this.cusForms = this.propCusForms;
    // console.log(this.propCusForms);
  }
}
</script>
<style scoped lang="scss">
  @import "./dialog.scss";
</style>
